package org.abc.fund.repository.funds;

import org.abc.fund.entity.funds.FundAnnouncement;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface FundAnnouncementRepository extends JpaRepository<FundAnnouncement, Long> {

    // 查询指定基金的最新一条公告
    List<FundAnnouncement> findTop1ByFundCodeOrderByIdDesc(String fundCode);

    Optional<FundAnnouncement> findTop1ByFundCodeOrderByPublishDateDesc(String fundCode);
}
